﻿<?php $this->load->view('admin/_header1') ?>
<div class="Main">
	<?php
	echo $title;
	echo form_open("admin/setting/dosaveauthorizedkey",array("id" => "formset"))
	?>
	<table cellpadding=5px cellspacing=5 >
		
		
		<tr height=25 >
			<td align=right >Enter your authorized key: </td>
			<td width=360 ><?php
			$data = array(
		              'name'        => 'AuthorizedKey',
		              'value'       => $AuthorizedKey,
		              'class'        => 'txd',
		              'style'		=>'width:300px'
		            );

			echo form_input($data);
			
			?></td>
		</tr>
		
		<tr height=25 >
			<td align=right >Enter HY authorized key: </td>
			<td width=360 ><?php
			$data = array(
		              'name'        => 'hyAuthorizedKey',
		              'id'        => 'txhyAuthorizedKey',
		              'value'       => $hyAuthorizedKey,
		              'class'        => 'txd',
		              'style'		=>'width:300px',
		              "readonly"		=> True
		            );

			echo form_input($data);
			
			if($this->session->userdata("uadmin_account")!="root")
			{
			?><BR/><a href=# onclick="getHYAuthorized()" class="orange">get HYAuthorized<a/>
			<?php
			}
			?>
				<input type="hidden" id="txhyAuthorizedPws" name="hyAuthorizedPws" value="<?=$hyAuthorizedPws;?>" />
			</td>
		</tr>
		
		<tr height=25 >
			<td align=right >service to  : </td>
			<td width=360 ><?php
				echo $ServiceDate2;
			?></td>
		</tr>
		
		<tr height=25 >
			<td align=right >Your agency office number: </td>
			<td width=360 ><?php
			$data = array(
		              'name'        => 'OfficeNumber',
		              'value'       => $OfficeNumber,
		              'class'        => 'txd'
		            );

			echo form_input($data);
			
			?></td>
		</tr>
		
		<tr height=25 >
			<td align=right ></td>
			<td width=360 ><?php
			$data = array(
				    'id'        => 'chkloginbooking',
		              'name'        => 'loginbooking',
		              'value'       => "1",
		              'checked'     => $LoginBooking==TRUE
		            );

			echo form_checkbox($data);
			echo form_label(" the unregisted user can book","chkloginbooking");
			
			?></td>
		</tr>
		
		<tr height=25 >
			<td align=right ></td>
			<td width=360 ><?php
			$data = array(
				    'id'        => 'chkquerylogin',
		              'name'        => 'querylogin',
		              'value'       => "1",
		              'checked'     => $querylogin==TRUE
		            );

			echo form_checkbox($data);
			echo form_label(" the unregisted user can't query air","chkquerylogin");
			
			?></td>
		</tr>
		
		<tr height=25 >
			<td align=right >your session key: </td>
			<td width=360 ><?php
			echo $sessionid;
			?>&nbsp;<a href="<?=base_url()."?id=".$sessionid;?>" class="color:orange" target="_blank" >preview</a></td>
		</tr>
		
		<tr height=30>
			<td></td>
			<td><input type=submit name="bbb" value="Save Setting" /></td>
			<td></td>
		</tr>
		
		<tr height=30>
			<td></td>
			<td>&nbsp;<span class="txred"><?=$message?></span></td>
			<td></td>
		</tr>
		
	</table>
	<?php
	echo form_close();
	?>
	
</div>
<script language="javascript">
	function getHYAuthorized()
	{
		$.ajax({
			url:"getHYAuthorized",
			success:function(xml)
			{
				ardata=xml.split("||");
				$("#txhyAuthorizedKey").val(ardata[0]);
				$("#txhyAuthorizedPws").val(ardata[1]);
			}
		});
		
	}
	
</script>
<?php $this->load->view('admin/_footer1') ?>